// nuxt.config.ts
import { defineNuxtConfig } from 'nuxt/config'

export default defineNuxtConfig({
  devtools: { enabled: true },

  app: {
    pageTransition: { name: 'page', mode: 'out-in' }
  },

  routeRules: {
    '/': { redirect: '/Home' } // 将根路径重定向到 /home
  },

  plugins: [
  ],

  modules: [
    '@element-plus/nuxt',
  ],

  elementPlus: {
    // 官方推荐配置
    importStyle: 'scss',
    components: ['ElContainer', 'ElHeader', 'ElMain', 'ElMenu', 'ElMenuItem'],
  },

  nitro: {
    compressPublicAssets: {
      gzip: true,
      brotli: true
    }
  },

  compatibilityDate: '2025-02-21',
})